---
title: Custom template formats
---

# Alternate prompt template formats

The primary template format for LangChain prompts is the simple and versatile `f-string`.
LangChain.js supports [`handlebars`](https://handlebarsjs.com/) as an experimental alternative.

Note that templates created this way cannot be added to the LangChain prompt hub and may have
unexpected behavior if you're using tracing.

## Setup

You'll need to install the [handlebars](https://www.npmjs.com/package/handlebars) templating engine package:

```npm2yarn
npm install handlebars
```

## Usage

import CodeBlock from "@theme/CodeBlock";
import Example from "@examples/experimental/prompts/handlebars.ts";

<CodeBlock language="typescript">{Example}</CodeBlock>
